<template>
  <div>
    <div class="part-title">Part VI Recording Of Operations</div>
    <div class="table-1">
      <div class="table-header">Task Codes</div>
      <div class="table-body">
        <div class="row">
          <div class="label">FOT</div>
          <div class="value">FuntionalOperational Test</div>
        </div>
        <div class="row">
          <div class="label">R/I</div>
          <div class="value">Removal/Installation</div>
        </div>
        <div class="row">
          <div class="label">ISP</div>
          <div class="value">Detailed Visual Inspection</div>
        </div>
        <div class="row gray">
          <div class="label">TS</div>
          <div class="value">Trouble Shooting</div>
        </div>
        <div class="row gray">
          <div class="label">SGH</div>
          <div class="value">Servicing & Ground Handling</div>
        </div>
        <div class="row gray">
          <div class="label">MP</div>
          <div class="value">Maintenance pratice</div>
        </div>
      </div>
    </div>
    <div class="table-2">
      <div class="table-header row-flex">
        <div class="date flex-center">Date</div>
        <div class="col-start column-flex">
          <div>AIRCRAFT</div>
          <div class="row-flex grow">
            <div>Type</div>
            <div>AC Reg</div>
            <div>
              ATA <br />
              Chapter
            </div>
          </div>
        </div>
        <div style="flex: 1" class="col-center column-flex">
          <div>ACTION</div>
          <div class="row-flex grow">
            <div style="flex: 1">Subject</div>
            <div>SGH</div>
            <div>R/I</div>
            <div>TS</div>
            <div>FOT</div>
            <div>ISP</div>
            <div>MP</div>
            <div>
              Time <br />
              spent
            </div>
          </div>
        </div>
        <div class="col-end">
          <div>
            <div>FUNCTION</div>
            <div>SIGNATURE</div>
          </div>
          <div class="row-flex">
            <div>
              Execution <br />
              Person
            </div>
            <div>Supervisor</div>
            <div>CRS</div>
          </div>
        </div>
      </div>
      <div class="table-body">
        <div class="row-item row-flex">
          <div class="date flex-center">1</div>
          <div class="col-start row-flex">
            <div>1</div>
            <div>2</div>
            <div>3</div>
          </div>
          <div class="col-center row-flex" style="flex: 1">
            <div>Subject</div>
            <div>1</div>
            <div>2</div>
            <div>3</div>
            <div>4</div>
            <div>5</div>
            <div>6</div>
            <div>7</div>
          </div>
          <div class="col-end row-flex">
            <div>4</div>
            <div>5</div>
            <div>6</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup></script>
<style scoped lang="less">
@import url("../less/index.less");
.content {
  min-height: 500px;
  padding: 30px 50px;
  box-sizing: border-box;
  .border();
}

.table-1,
.table-2 {
  font-size: 20px;
}

.table-1 {
  width: 800px;
  margin: 0 auto;
  .border();
  .table-header {
    background-color: #06214c;
    color: #fff;
    font-weight: 600;
    padding: 5px 10px;
    text-align: center;
    .border-bottom();
  }
  .table-body {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    font-size: 14px;
    .row {
      display: flex;
      .border-bottom();
      & > div {
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .label {
        padding: 5px;
        font-weight: 600;
        width: 60px;
        box-sizing: border-box;
      }
      .value {
        flex: 1;
      }
      &.gray {
        background-color: #f2f2f2;
        border-bottom: none;
      }
    }
  }
}

.table-2 {
  margin-top: 50px;
  .row-flex {
    display: flex;
    &.grow {
      & > div {
        flex: 1;
      }
    }
  }
  .column-flex {
    display: flex;
    flex-direction: column;
    & > div {
      flex: 1;
    }
  }
  .flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .table-header {
    text-align: center;
    .border();
    .col-center,
    .col-end,
    .col-start {
      & > div:first-child,
      & > div:last-child > div {
        display: flex;
        justify-content: center;
        align-items: center;
        flex: 1;
      }
      & > div:first-child {
        .border-bottom();
      }
      & > div:last-child {
        & > div {
          .border-right();
          &:last-child {
            border-right: none;
          }
        }
      }
    }
    .col-end {
      & > div:first-child {
        .border-bottom();
        flex-direction: column;
        & > div:first-child {
          .border-bottom();
          flex: 1;
          width: 100%;
        }
      }
    }
    .col-center {
      & > div:last-child {
        & > div {
          flex: 0 1 auto;
          &:nth-child(n + 2) {
            width: 70px;
          }
          &:first-child {
            flex: 1;
          }
        }
      }
    }
  }
  .table-body {
    .border();
    border-top: none;
    .row-item {
      .row-flex {
        & > div {
          padding: 10px 0;
          
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          .border-right();
          &:last-child {
            border-right: none;
          }
        }
        &.col-center {
          & > div {
            flex: 0 1 auto;
            &:nth-child(n + 2) {
              width: 70px;
            }
            &:first-child {
              flex: 1;
            }
          }
        }
      }
    }
  }
  .date {
    .border-right();
    width: 100px;
  }
  .col-start {
    width: 300px;
    .border-right();
  }
  .col-end {
    width: 350px;
  }
  .col-center {
    .border-right();
  }
}
</style>
